Skip to content

Separate editor model and fail fast on exhausted quota - #2

Merged
apravint merged 1 commit into
mainfrom
feat/editor-model-quota
Nov 6, 2026
Merged

apravint merged 1 commit into
mainfrom
feat/editor-model-quota

Conversation

@apravint

@apravint apravint commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • --editor-provider / --editor-model: a separate model scores chapters, picks the opening and runs the whole-book review. The writing model never grades its own prose when this is set.
  • Exhausted quota or credit (OpenAI insufficient_quota, Gemini daily limits, Anthropic low balance) now stops at once with a resume hint instead of five backoff retries.
  • Provider-requested retry delays (Retry-After, Gemini retryDelay) are honored; waits over 2 minutes fail fast.

Testing

  • 48 offline tests pass, including new retry and editor-routing tests
  • Real Gemini Pro quota error: now fails in 4s with a clear message

Not covered

  • Streamlit and the web server still use one model for everything

🤖 Generated with Claude Code

Add --editor-provider/--editor-model so a different model scores chapters,
picks the opening and reviews the book, since models grade their own prose
leniently. Stop immediately with a resume hint when an account is out of
quota or credit, and honor provider-requested retry delays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apravint
apravint merged commit 9d864b4 into main Nov 6, 2026
3 checks passed
@apravint
apravint deleted the feat/editor-model-quota branch November 6, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant